package com.wzp.retry;

import net.sf.cglib.proxy.Enhancer;

/**
 * @author wangzhengpeng
 */
public class SpringRetryProxy {

    public Object newProxyInstance(Object target) {
        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(target.getClass());
        enhancer.setCallback(new AnnotationAwareRetryOperationsInterceptor());
        return enhancer.create();
    }
}